@@ -29,3 +29,7 @@ |
||
| 29 | 29 |
// |
| 30 | 30 |
// Example: |
| 31 | 31 |
// @linkColor: #ff0000; |
| 32 |
+ |
|
| 33 |
+.top-container {
|
|
| 34 |
+ margin-top: 60px; |
|
| 35 |
+} |
@@ -2,4 +2,13 @@ class ApplicationController < ActionController::Base |
||
| 2 | 2 |
# Prevent CSRF attacks by raising an exception. |
| 3 | 3 |
# For APIs, you may want to use :null_session instead. |
| 4 | 4 |
protect_from_forgery with: :exception |
| 5 |
+ |
|
| 6 |
+ config.to_prepare do |
|
| 7 |
+ Devise::SessionsController.layout "auth" |
|
| 8 |
+ Devise::RegistrationsController.layout "auth" |
|
| 9 |
+ Devise::ConfirmationsController.layout "auth" |
|
| 10 |
+ Devise::UnlocksController.layout "auth" |
|
| 11 |
+ Devise::PasswordsController.layout "auth" |
|
| 12 |
+ end |
|
| 13 |
+ |
|
| 5 | 14 |
end |
@@ -0,0 +1,9 @@ |
||
| 1 |
+class users::confirmationsController < Devise::confirmationsController |
|
| 2 |
+ # def new |
|
| 3 |
+ # super |
|
| 4 |
+ # end |
|
| 5 |
+ |
|
| 6 |
+ # def create |
|
| 7 |
+ # super |
|
| 8 |
+ # end |
|
| 9 |
+end |
@@ -0,0 +1,9 @@ |
||
| 1 |
+class users::passwordsController < Devise::passwordsController |
|
| 2 |
+ # def new |
|
| 3 |
+ # super |
|
| 4 |
+ # end |
|
| 5 |
+ |
|
| 6 |
+ # def create |
|
| 7 |
+ # super |
|
| 8 |
+ # end |
|
| 9 |
+end |
@@ -0,0 +1,12 @@ |
||
| 1 |
+class users::registrationsController < Devise::registrationsController |
|
| 2 |
+ |
|
| 3 |
+ layout 'auth' |
|
| 4 |
+ |
|
| 5 |
+ # def new |
|
| 6 |
+ # super |
|
| 7 |
+ # end |
|
| 8 |
+ |
|
| 9 |
+ # def create |
|
| 10 |
+ # super |
|
| 11 |
+ # end |
|
| 12 |
+end |
@@ -0,0 +1,9 @@ |
||
| 1 |
+class users::sessionsController < Devise::sessionsController |
|
| 2 |
+ # def new |
|
| 3 |
+ # super |
|
| 4 |
+ # end |
|
| 5 |
+ |
|
| 6 |
+ # def create |
|
| 7 |
+ # super |
|
| 8 |
+ # end |
|
| 9 |
+end |
@@ -0,0 +1,9 @@ |
||
| 1 |
+class users::unlocksController < Devise::unlocksController |
|
| 2 |
+ # def new |
|
| 3 |
+ # super |
|
| 4 |
+ # end |
|
| 5 |
+ |
|
| 6 |
+ # def create |
|
| 7 |
+ # super |
|
| 8 |
+ # end |
|
| 9 |
+end |
@@ -46,13 +46,10 @@ |
||
| 46 | 46 |
<span class="icon-bar"></span> |
| 47 | 47 |
<span class="icon-bar"></span> |
| 48 | 48 |
</a> |
| 49 |
- <a class="brand" href="/">Avalanche Game</a> |
|
| 49 |
+ <%= render 'layouts/partials/logo' %> |
|
| 50 |
+ |
|
| 50 | 51 |
<div class="container-fluid nav-collapse"> |
| 51 |
- <ul class="nav"> |
|
| 52 |
- <li><%= link_to "About", start_about_path %></li> |
|
| 53 |
- <li><%= link_to "Login", new_user_session_path %></li> |
|
| 54 |
- <li><%= link_to "Sign Up", new_user_registration_path %></li> |
|
| 55 |
- </ul> |
|
| 52 |
+ <%= render 'layouts/partials/nav_links' %> |
|
| 56 | 53 |
</div><!--/.nav-collapse --> |
| 57 | 54 |
</div> |
| 58 | 55 |
</div> |
@@ -46,35 +46,20 @@ |
||
| 46 | 46 |
<span class="icon-bar"></span> |
| 47 | 47 |
<span class="icon-bar"></span> |
| 48 | 48 |
</a> |
| 49 |
- <a class="brand" href="#">AvalancheGame</a> |
|
| 49 |
+ <%= render 'layouts/partials/logo' %> |
|
| 50 | 50 |
<div class="container nav-collapse"> |
| 51 |
- <ul class="nav"> |
|
| 52 |
- <li><%= link_to "Link1", "/path1" %></li> |
|
| 53 |
- <li><%= link_to "Link2", "/path2" %></li> |
|
| 54 |
- <li><%= link_to "Link3", "/path3" %></li> |
|
| 55 |
- </ul> |
|
| 51 |
+ <%= render 'layouts/partials/nav_links' %> |
|
| 56 | 52 |
</div><!--/.nav-collapse --> |
| 57 | 53 |
</div> |
| 58 | 54 |
</div> |
| 59 | 55 |
</div> |
| 60 | 56 |
|
| 61 |
- <div class="container"> |
|
| 57 |
+ <div class="container top-container"> |
|
| 62 | 58 |
<div class="row"> |
| 63 |
- <div class="span9"> |
|
| 59 |
+ <div class="span4 col-md-offset-4"> |
|
| 64 | 60 |
<%= bootstrap_flash %> |
| 65 | 61 |
<%= yield %> |
| 66 | 62 |
</div> |
| 67 |
- <div class="span3"> |
|
| 68 |
- <div class="well sidebar-nav"> |
|
| 69 |
- <h3>Sidebar</h3> |
|
| 70 |
- <ul class="nav nav-list"> |
|
| 71 |
- <li class="nav-header">Sidebar</li> |
|
| 72 |
- <li><%= link_to "Link1", "/path1" %></li> |
|
| 73 |
- <li><%= link_to "Link2", "/path2" %></li> |
|
| 74 |
- <li><%= link_to "Link3", "/path3" %></li> |
|
| 75 |
- </ul> |
|
| 76 |
- </div><!--/.well --> |
|
| 77 |
- </div><!--/span--> |
|
| 78 | 63 |
</div><!--/row--> |
| 79 | 64 |
|
| 80 | 65 |
<footer> |
@@ -46,19 +46,15 @@ |
||
| 46 | 46 |
<span class="icon-bar"></span> |
| 47 | 47 |
<span class="icon-bar"></span> |
| 48 | 48 |
</a> |
| 49 |
- <a class="brand" href="/">Avalanche Game</a> |
|
| 49 |
+ <%= render 'layouts/partials/logo' %> |
|
| 50 | 50 |
<div class="container nav-collapse"> |
| 51 |
- <ul class="nav"> |
|
| 52 |
- <li><%= link_to "About", start_about_path %></li> |
|
| 53 |
- <li><%= link_to "Login", new_user_session_path %></li> |
|
| 54 |
- <li><%= link_to "Sign Up", new_user_registration_path %></li> |
|
| 55 |
- </ul> |
|
| 51 |
+ <%= render 'layouts/partials/nav_links' %> |
|
| 56 | 52 |
</div><!--/.nav-collapse --> |
| 57 | 53 |
</div> |
| 58 | 54 |
</div> |
| 59 | 55 |
</div> |
| 60 | 56 |
|
| 61 |
- <div class="container" style="margin-top: 60px;"> |
|
| 57 |
+ <div class="container top-container"> |
|
| 62 | 58 |
<div class="row"> |
| 63 | 59 |
<div class="span9"> |
| 64 | 60 |
<%= bootstrap_flash %> |
@@ -0,0 +1 @@ |
||
| 1 |
+<a class="brand" href="/">Avalanche Game</a> |
@@ -0,0 +1,5 @@ |
||
| 1 |
+<ul class="nav"> |
|
| 2 |
+ <li><%= link_to "About", start_about_path %></li> |
|
| 3 |
+ <li><%= link_to "Login", new_user_session_path %></li> |
|
| 4 |
+ <li><%= link_to "Sign Up", new_user_registration_path %></li> |
|
| 5 |
+</ul> |
@@ -19,5 +19,14 @@ module AvalancheGame |
||
| 19 | 19 |
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. |
| 20 | 20 |
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
| 21 | 21 |
# config.i18n.default_locale = :de |
| 22 |
+ |
|
| 23 |
+ config.to_prepare do |
|
| 24 |
+ Devise::SessionsController.layout "auth" |
|
| 25 |
+ Devise::RegistrationsController.layout proc{ |controller| user_signed_in? ? "application" : "auth" }
|
|
| 26 |
+ Devise::ConfirmationsController.layout "auth" |
|
| 27 |
+ Devise::UnlocksController.layout "auth" |
|
| 28 |
+ Devise::PasswordsController.layout "auth" |
|
| 29 |
+ end |
|
| 30 |
+ |
|
| 22 | 31 |
end |
| 23 |
-end |
|
| 32 |
+end |